import Vue from 'vue'
import App from './App'
import { $http } from '@escook/request-miniprogram'
import store from './store/store.js'
Vue.config.productionTip = false

// 配置接口根路径
$http.baseUrl = 'https://www.uinav.com'
// 请求响应消息方法
uni.$showMsg = function (title = "数据加载失败！" , duration = 1500){
  uni.showToast({
    title,
    duration,
    icon:"none"
  })
}
// 请求拦截器
$http.beforeRequest = function (options) {
  uni.showLoading({
    title:"数据加载中..."
  })
}
$http.afterRequest = function () {
  uni.hideLoading()
}
App.mpType = 'app'
uni.$http = $http
const app = new Vue({
    ...App,
      store
})
app.$mount()
